// $URL: http://mingw-lib.googlecode.com/svn/trunk/working/nam/ntr.h $
// $Rev: 95 $
// $Author: akio.miyoshi $
// $Date:: 2010-05-21 04:37:01 +0000#$

#ifndef NetworkThreadRequest_H
#define NetworkThreadRequest_H

#include <QtCore>
#include <QtNetwork>

#include "nam.h"
#include "qnetworkaccessmanager.h"

class NetworkAccessManager;

class NetworkThreadRequest : public QThread
{
    Q_OBJECT

public:
    static QByteArray doGet2(QString url);
    static QByteArray doGet2(QUrl url);
    static QByteArray doGet2(QNetworkRequest request);
    static QList<QByteArray> doGet2(QList<QNetworkRequest> a_requestList);

public slots:
    void replyFinished();

private:
    NetworkThreadRequest(QNetworkAccessManager::Operation a_op, QNetworkRequest a_request, QByteArray a_postData);
    void run();
    NetworkAccessManager *m_nam;
    QNetworkAccessManager::Operation m_op;
    QNetworkRequest m_request;
    QByteArray m_postData;
    QByteArray m_response;
    QNetworkReply *m_reply;
};

#endif // NetworkThreadRequest_H
